/*
 * To change this template, choose Tools | Templates and open the template in
 * the editor.
 */

package testklient;

import theserver.DeviceInfo;


/**
 * @author Emma
 */
public class Main {

	public final static int	DEFAULT_PORT	= 2000;


	/**
	 * @param args the command line arguments
	 */
	public static void main(String[] args) {
		DeviceInfo dev = null;
		int port = DEFAULT_PORT;
		String host = null;
		if (args.length == 1) {
			host = args[0];
		}
		if (args.length == 2) {
			port = Integer.parseInt(args[1]);
		}
		if (args.length == 8) {
			host = args[0];
			port = Integer.parseInt(args[1]);
			dev = new DeviceInfo(args[5], args[3]);
			dev.setBssid(args[2]);
			dev.setSsid(args[4]);
			dev.setIpAddress(args[6]);
			dev.setPort(Integer.parseInt(args[7]));
		}
		Controller controller = new Controller(host, port, dev);
	}

}
